<template>
  <div style="border: solid 1px #ebebeb;">
    <div style="height: 45px; background-color: #f2f2f2; padding: 10px 0px 0px 10px">
      <div style="float: left; margin: 10px 0px 0px 10px">
        交易统计
      </div>
    </div>
    <div style="text-align: right; margin-bottom: 20px">单位：万元</div>
    <div id="main" style="width:100%; height: 500px">

    </div>
  </div>
</template>

<script>
import * as echarts from 'echarts';
export default {
  name: "Census",
  data(){
    return{
      value: '',
    }
  },
  mounted() {
    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;
    option = {
      tooltip: {
        trigger: 'item'
      },
      legend: {
        orient: 'horizontal',
        left: 'left',
      },
      series: [
        {
          name: '访问来源',
          type: 'pie',
          radius: '50%',
          data: [
            {value: 38, name: '复诊开药'},
            {value: 16, name: '预约挂号'},
            {value: 24, name: '视频问诊'},
            {value: 29, name: '电话问诊'},
            {value: 20, name: '图片问诊'}
          ],
          emphasis: {
            itemStyle: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    myChart.setOption(option);
  }
}
</script>

<style scoped>

</style>
